<script language="JavaScript">
	function issue_add(iJob) {
		oForm = document.form_issue_add;
		oForm.iJob.value = iJob;
		oForm.sJob.value = sJobNames[iJob];
		layerShow('layer_issue_add');
		for (i = oForm.iReceiver.options.length - 1; i >= 0; i--) {
			oForm.iReceiver.remove(i);
		}
		oForm.iReceiver.options.add(new Option('[ <?php print msg('None') ?> ]', '0'));
		for (i = 0; i < iReceivers[iJob].length; i++) {
			oNewOption = new Option(sUserNames[iReceivers[iJob][i]], iReceivers[iJob][i]);
			oForm.iReceiver.options.add(oNewOption);
		}
		oForm.sBody.focus();
	}
</script>
<div id="layer_issue_add" class="hidden">
<form action="index.php" method="post" name="form_issue_add">
<input type="hidden" name="sAction" value="issue-add">
<input type="hidden" name="sView" value="job-public">
<input type="hidden" name="iJob">
<table class="boxborder" cellspacing="0">
	<tr>
		<td class="boxhandle" colspan="2"><?php print msg('Send issue') ?></td>
	</tr>
	<tr>
		<td class="fieldname"><?php print msg('Project') ?>:</td>
		<td class="fieldvalue"><input type="text" name="sJob" disabled></td>
	</tr>
	<tr>
		<td class="fieldname"><?php print msg('Receiver') ?>:</td>
		<td class="fieldvalue">
			<select name="iReceiver">
			</select>
		</td>
	</tr>
	<tr>
		<td class="fieldname"><?php print msg('Text') ?>:</td>
		<td class="fieldvalue">
			<textarea name="sBody" cols="50" rows="8"></textarea>
		</td>
	</tr>
	<tr>
		<td class="boxbody center" colspan="2">
			<input type="submit" value="<?php print msg('OK') ?>">
			<input type="button" value="<?php print msg('Cancel') ?>" onClick="layerHide('layer_issue_add');">
		</td>
	</tr>
</table>
</form>
</div>
